<html>
<script>
    if (window.testRunner)
        testRunner.dumpAsText();
</script>
<body>

    <table id="testTable1" rules="rows"><tr><td>asdf</td><td>asdf</td></tr></table>
    <table id="testTable2" rules="all"><tr><td>asdf</td><td>asdf</td></tr></table>
    <table id="testTable3" rules="col"><tr><td>asdf</td><td>asdf</td></tr></table>
    <table id="testTable4" rules="groups"><tr><td>asdf</td><td>asdf</td></tr></table>
    <table id="testTable5"><tr><td>asdf</td><td>asdf</td></tr></table>

    <BR>------------------------------------<BR>

    <div id="result"></div>

    <script>
        if (window.accessibilityController) {
            var result = document.getElementById("result");

            // these should be the tables. in this order
            // the last table should not show up as a table.
            for (var k = 0; k < 5; k++) {
                var table = accessibilityController.accessibleElementById('testTable' + (k + 1));
                result.innerText += table.allAttributes() + "\n\n";
            }
        }
    </script>
</body>
</html>
